{% extends "vmbase.html" %}
{% block title %}OVIM - VMHOST DETAIL{% endblock %}

{%block head %}
<script language="javascript"> 
<!-- 
function popupcentree(page,largeur,hauteur,options) 
{ 
    var top=(screen.height-hauteur)/2; 
    var left=(screen.width-largeur)/2;
    window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options); 
} 
-->
</script>
{% endblock %}

{% block navbar %}
<a class="navbar" href="/ovim/"> >> VMHost List</a>
{%if vm.name %}
	<a class="navbar" href="/ovim/{{ vmHost.id }}"> >> {{ vmHost.name }} >> {{ vm.name }} </a>
{% else %}
	<a class="navbar" href="/ovim/{{ object.id }}"> >> {{ vmHost.name }} >> New VM </a>
{% endif %}
{% endblock %}

{% block action %}
<div class="action">
 	<h3>ACTIONS</h3>
	<div id="actionmenu">
		{% if vm.name %}
		<ul>
			<li>
				<a href="../addvm/" title="Add a new VM to {{ object.name }}">
					<img src="/ovim/media/img/list-add.png"/>
					New VM
				</a>
			</li>		
			<li>
				<a href="delete/" title="Remove {{ object.name }} from {{ vmHost.name }}">
					<img src="/ovim/media/img/edit-clear-16.png"/>
					Delete VM
				</a>
			</li>
			<li>
				<a href='javascript:popupcentree("recover/",530,220,"menubar=no,scrollbars=no,statusbar=no")' title="Recover {{ object.name }} from a backup!">
					<img src="/ovim/media/img/edit-undo.png"/>
					Recover VM
				</a>
			</li>
		</ul>
		{% else %}
		<ul>
			<li>
				<a href="../" title="Cancel">
					<img src="/ovim/media/img/process-stop.png"/>
					Cancel
				</a>
			</li>
		</ul>		
		{% endif %}
	</div>
 </div>
{% endblock %}

{% block content %}
	{% if error_message %}
	<p class="errornote">
		The was error(s) submiting this form...
	</p>
	{% endif %}
	
	<div class="ovim_content">
		<h3>VM DETAIL</h3>
		<div class="ovim_content_box">
			<img src="/ovim/media/img/computer.png" class="image" alt="Big Image" />
			<h2>{{ vm.name }}</h2>
			<form method="post">
				<table>{{ form }}</table>
				<center><input type="submit" /></center>		
			</form>
		</div>
	</div>
{% endblock %}